from flask import Flask, render_template,session
from datetime import timedelta,datetime
from Web.Pojo.User import User
import os,pickle


#增加set方法 del
def set(key,value):
    session[ key ]=pickle.dumps(value )

#增加取不存在key 异常处理
def get(key):
    try:
        value = pickle.loads(session.get(key))
        return value
    except:
        return None




if __name__ == '__main__':
    user = User()

    print(pickle.dumps(user ))